
'use strict';

/**
	Part of Zombie Navigator
	Copyright © 2015  Zombie Navigator Developers
	
	@file
	@module
	@license AGPL-3.0+
*/


/* Addon SDK dependencies */
const _sdkTabs = require('sdk/tabs');


/* Exported APIs */

/**
	@public
	@method
	@param {string} uri
	@returns {boolean}
*/
const openPopup = uri => {
	uri = uri ? uri + '' : 'about:blank';
	
	const sdkTabs = _sdkTabs;
	
	try {
		sdkTabs.open({
			url: uri
			, inNewWindow: true
		});
	} catch (e) {
		throw new Error(e + '');
	}
	
	return true;
};


/* Exports */
exports.openPopup = openPopup;


// vim: ts=4 noet ai

